package com.tianqingwl.gsystem.resources.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tianqingwl.gsystem.resources.pojo.SysPermission;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SysPermissionMapper extends BaseMapper<SysPermission> {
    List<SysPermission> findUserRolePermissionByUsername(String username);
    int updateLeafById(@Param("leaf") boolean leaf,@Param("perId") Long perId);

    List<SysPermission> selectPermissionList(@Param("roleId")Long roleId,@Param("roleIn") Boolean roleIn);

    void deleteRolePermissionRelate(@Param("roleId") Long roleId,@Param("permissionId") Long permissionId);
    void deleteRolePermissionRelateByPerId(@Param("permissionId") Long permissionId);
}
